﻿<Window x:Class="TextBox.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525" Name="mainWindow">
    <Grid>
        <TextBox Height="23" HorizontalAlignment="Left" Margin="212,124,0,0" Name="textBox" VerticalAlignment="Top" Width="120" SelectionChanged="textBox_SelectionChanged" />
        <Label Content="{Binding ElementName=textBox, Path=SelectedText}" Height="28" HorizontalAlignment="Center" Margin="12,162,0,0" Name="label" VerticalAlignment="Top" Width="479" HorizontalContentAlignment="Center" />
        <Button Content="Click Me!" Height="23" HorizontalAlignment="Left" Margin="334,283,0,0" Name="button" VerticalAlignment="Top" Width="75" Click="button_Click" />
        <Label  Content="{Binding ElementName=mainWindow, Path=ClickCount}" Height="28" HorizontalAlignment="Left" Margin="463,282,0,0" Name="clickLabel" VerticalAlignment="Top" />
    </Grid>
</Window>
